package com.ccit.common.client;

import com.ccit.common.feign.FeignConfiguration;
import com.ccit.common.result.Result;
import com.ccit.model.Employee;
import com.ccit.model.vo.employee.EmployeeVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;

import java.util.List;


//@Repository
@Component
@FeignClient(value = "service-employee", configuration = FeignConfiguration.class)
public interface EmployeeClient {


    @RequestMapping(value = "/employee/saveEmployee", method = RequestMethod.POST)
    Result saveEmployee(@RequestBody Employee employee);


    @RequestMapping(value = "/employee/updateInfo", method = RequestMethod.PUT)
    Result updateEmployeeInfo(@RequestBody EmployeeVo employeeVo);


    @RequestMapping(value = "/employee/getByPage/{id}", method = RequestMethod.GET)
    public Employee getEmployeeById(@PathVariable Long  id);


    @RequestMapping(value = "/employee/getByPage", method = RequestMethod.GET)
    public List<Employee> getEmployeeByIds(@RequestParam List<Long>  idList);
}
